"""
WSGI config for adorynblog project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""

import os
import sys
import site
from os.path import join, dirname, abspath
from django.core.wsgi import get_wsgi_application

# Add the site-packages of the chosen virtualenv to work with
site.addsitedir('/root/.virtualenvs/BLOGENV/local/lib/python2.7/site-packages')

# Add the app's directory to the PYTHONPATH
sys.path.append('/root/deploySites/adorynblog')
sys.path.append('/root/deploySites/adorynblog/adorynblog')

# Activate your virtual env
activate_env=os.path.expanduser("/root/.virtualenvs/BLOGENV/bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "adorynblog.settings")

application = get_wsgi_application()
